import { ref } from "vue";
import { Api_aiot, Api } from "/@/api/aiot/deviceType";

export function useEquipmentTypeSelect(isEnterprise: boolean) {
  const columns = ref();
  if (isEnterprise) {
    columns.value = [
      // {
      //   title: "设备图片",
      //   dataIndex: "equipmentTypePhoto",
      //   width: 120,
      // },
      {
        title: "设备机型名称",
        dataIndex: "equipmentTypeName",
      },
    ];
  } else {
    columns.value = [
      // {
      //   title: "设备图片",
      //   dataIndex: "defaultEquipmentTypePhoto",
      //   width: 120,
      // },
      {
        title: "设备类型名称",
        dataIndex: "defaultEquipmentTypeName",
      },
    ];
  }
  return {
    Api: isEnterprise ? Api_aiot : Api,
    columns,
  };
}
